package com.huangsm.cloud.consumer.feign;

import com.huangsm.cloud.config.FeignFormSupportConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

/**
 * 测试Feign实现表单提交
 *
 * @author huang
 * @PACKAGE_NAME com.huangsm.cloud.consumer.feign
 * @PROJECT_NAME microservice-springcloud
 * @date 2019/1/16
 */
@FeignClient(name = "testForm", url = "https://gitee.com/wangyuanbaby/microservice-springcloud", configuration = FeignFormSupportConfig.class)
public interface TestFeignClient {
    @PostMapping(value = "/test",
            consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE},
            produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}
    )
    void sumbitForm(Map<String, ?> queryParam);
}
